import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 获取今日核销统计数据
export function getVerifyCount(day) {
  return request({
    url: '/api/meal-statistic',
    method: 'get',
    params: { day }
  })
}

// 获取订餐人数统计
export function getOrderCount(year, month, day, mealType) {
  return request({
    url: '/mealorder/order/orderCount',
    method: 'get',
    params: { year, month, day, mealType }
  })
}

// 获取培训订餐详情
export function getTrainingOrder(trainingName) {
  return request({
    url: '/mealorder/order/trainingOrder',
    method: 'get',
    params: { trainingName }
  })
}

// 查询核销比例统计数据（）
export function queryVerificationStatistics(data) {
  return request({
    url: '/verification/verification/query',
    method: 'post',
    data: data
  })
}

export function getMealStatistics(month) {
  return request({
    url: '/api/training-meal-statistic/by-month',
    method: 'get',
    params: { month }
  })
}

// 获取部门信息
export function getDeptsByTrainingName(trainingName) {
  return request({
    url: '/meals/depts',
    method: 'get',
    params: { trainingName }
  })
}

// 获取核销详情
export function getDetailVerify(trainingName, dept, mealType) {
  return request({
    url: '/meals/detailVerify',
    method: 'get',
    params: { trainingName, dept, mealType }
  })
}
